package cn.sxt.seata.feign;

import cn.sxt.seata.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @description: -- 调用扣账户金额的微服务
 * @author：Bing
 * @date：2021/4/19 15:02
 * @version：1.0
 */
@FeignClient(value = "seata-account-service")
public interface AccountService {
    /**
     * 扣减账户金额
     * @param userId
     * @param money
     * @return
     */
    @PostMapping("/account/decrease")
    CommonResult decrease(@RequestParam("userId") Long userId, @RequestParam("money") Long money);
}
